<%@ page language="java" import="java.util.*" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="StudentScore.StudentDao" %>
    <%@page import="StudentScore.StudentDaoJDBC" %>
    <%@page import="StudentScore.Student" %>
    <%@page import="java.util.List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>获得平均成绩</title>
</head>
<body>
<form name="postForm" action="Achievement.jsp" method="post">
		<p>   各科目平均成绩</p>
		<table width="500" border="5" >
		<tr>
	    	<td>数学</td>
	    	<td>体育</td>
	    	<td>Java</td>
	    	<td>总成绩</td>
	  	</tr>
	  	<%
		StudentDao student = new StudentDaoJDBC();
    	double avmath=student.getCourseAv("math");
		double avsport =student.getCourseAv("java");
		double avjava =student.getCourseAv("sport");
		double avallcourse =student.getCourseAv("allscore");
		%>
			<tr>
			<td><%=avmath%></td>
    		<td><%=avsport%></td>
    		<td><%=avjava %></td>
    		<td><%=avallcourse%></td>
    	    </tr>
    	   
		</table>
		<input type="submit" value="返回菜单" />
	</form>
</body>
</html>